<ion-header-bar class="bar-positive">
  <h1 class="title">有问有答</h1>
  <div class="buttons" ng-click="openModal()">
    <a class="button no-animation button-icon icon ion-ios-plus-outline"></a>
  </div>
</ion-header-bar>
<ion-subheader-bar class="bar bar-subheader">
  <ul class="slide-tab">
    <li ng-class="slideIndex == 0 ? 'current':''"><a ng-click="activeSlide(0)">全部问题</a></li>
    <li ng-class="slideIndex == 1 ? 'current':''"><a ng-click="activeSlide(1)">我的问题</a></li>
    <li ng-class="slideIndex == 2 ? 'current':''"><a ng-click="activeSlide(2)">我的回答</a></li>
  </ul>
</ion-subheader-bar>
<ion-view>
  <ion-content style="background: #ebebeb" class="has-subheader">
    <ion-refresher
      pulling-text="松开手会有惊喜哦"
      on-refresh="doRefresh(slideIndex)">
    </ion-refresher>
    <div class="a-warp">
      <div ng-repeat="quora in quoralist" ng-click="goqu(quora)" class="card y-card">
        <div class="item item-thumbnail-left">
          <img ng-src="{{quora.queImg}}" ng-if="quora.queImg">
          <img src="img/img-default-quora.png" ng-if="!quora.queImg">
          <h2>{{quora.queTitle}}</h2>
          <span class="y-lasttime-right">{{quora.queTime | date:'yyyy-MM-dd HH:mm'}}</span>
          <p>{{quora.queContent}}</p>
          <p class="y-front-size">
            <span class="y-p-col"><i class="ion-ios-heart-outline"></i>{{quora.queLike}}</span>
            <span class="y-p-col-right" ng-click="showComment=true" ng-class="{'df-color':showComment}"><i
              class="ion-chatbubble-working"></i>{{quora.queComment}}</span>
          </p>
        </div>
      </div>
    </div>
    <div ng-if="quoralist.length==0&&slideIndex == 1" class="df-none-qu">
      <h2 style="letter-spacing: 2px">您还没问过任何问题</h2>
      <p class="df-none-p">
      <div ng-click="addqu()" class="button button-positive aui-btn-block aui-btn-sm df-none-button">现在提问</div>
      </p>
    </div>
  </ion-content>
</ion-view>
<script id="my-modal.html" type="text/ng-template">
  <ion-modal-view>
    <ion-header-bar class="bar bar-header bar-positive">
      <div class="buttons">
        <button ng-click="modal.hide()"
                class="button back-button no-animation button-icon icon buttons button-clear ion-ios-arrow-back">
        </button>
      </div>
      <h1 class="title">新增问题{{queTitle}}</h1>
      <button class="button button-clear button-primary" ng-click="ask()">发布</button>
    </ion-header-bar>
    <ion-content>
      <div class="list">
        <label class="item item-input">
          <span class="input-label">标题：</span>
          <input type="text" name="actnum" ng-model="question.queTitle">
        </label>
        <label class="item item-input">
          <span class="input-label">标签：</span>
          <input type="text" name="actnum" ng-model="question.queTags" placeholder="多个标签以空格隔开">
        </label>
      </div>
      <div class="padding df-none-textarea model-list">
        <textarea placeholder="&nbsp;&nbsp;请输入内容" ng-model="question.queContent"></textarea>
        <div class="buttons buttons-left">
          <div ng-repeat="item in items" class="imgone">
            <img ng-src="{{item.url}}" alt=""/>
          </div>
          <img src="img/quora/add.jpg" data-ng-click="choosePicMenuf()"/>
        </div>
      </div>
    </ion-content>
  </ion-modal-view>
</script>
